import java.util.Scanner;

/**
 * @Author 12629
 * @Description：
 */
public class Test {


    private boolean isLegal(char ch) {
        if(ch >= 'a' && ch <= 'z'  || ch >= '0' && ch <= '9') {
            return true;
        }
        return false;
    }
    public boolean isPalindrome(String s) {
        s = s.toLowerCase();
        int left = 0;
        int right = s.length()-1;
        while(left < right) {

            while(left < right && !isLegal(s.charAt(left))) {
                left++;
            }

            while(left < right && !isLegal(s.charAt(right))) {
                right--;
            }

            if(s.charAt(left) != s.charAt(right)) {
                return false;
            }else {
                left++;
                right--;
            }
        }

        return true;
    }


    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String s = in.nextLine();
            int k = s.lastIndexOf(' ');
            String ret = s.substring(k+1);
            System.out.println(ret.length());
        }
    }

    public int firstUniqChar(String s) {
        //这里其实  使用了哈希的思想
        int[] count = new int[26];
        //遍历原来的字符串 对应的技术数组下标位置++
        for(int i = 0; i < s.length();i++) {
            char ch = s.charAt(i);
            count[ch - 'a']++;
        }
        //再次遍历原来的字符串，看每个字符此时在计数数组中出现的次数
        for(int i = 0; i < s.length();i++) {
            char ch = s.charAt(i);
            if(count[ch - 'a'] == 1) {
                return i;
            }
        }

        return -1;
    }

    public static void main(String[] args) {
        StringBuilder stringBuilder = new StringBuilder("abcd");
        stringBuilder.append(1);
        stringBuilder.append("po");
        stringBuilder.append("abcd").append(12.5);
        System.out.println(stringBuilder);

        stringBuilder.setCharAt(0,'k');
        System.out.println(stringBuilder);

        stringBuilder.insert(1,"oooooooooooooooooo");
        System.out.println(stringBuilder);

        stringBuilder.reverse();

        System.out.println(stringBuilder);

        String str = stringBuilder.toString();

        System.out.println(str);


    }
}
